<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<%
	xMode = Request("xMode")
	showSubMenu = "80"

	'## 계정 정보
	SQL = "SELECT LEFT(incomeDt,4) inYear FROM tblIncome WHERE  flag='Y' GROUP BY LEFT(incomeDt,4)" 

	Set Rs=Server.CreateObject("ADODB.RecordSet")
	Rs.open SQL, DbCon, 1
	
	If Rs.eof Or Rs.bof Then 
	Else 
		Do Until Rs.eof Or Rs.bof		
			yrOption = yrOption & "<option value=""" & rs("inYear") & """>" & rs("inYear") & "</option>" & vbCrlf
		Rs.movenext
		Loop 
	End If
	
%>
<!-- #include virtual=/inc/header_cross.inc.asp -->  

<script language="javascript">    
		 $(document).ready(function() {
			  var clareCalendar = {
			   monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
			   dayNamesMin: ['일','월','화','수','목','금','토'],
			   weekHeader: 'Wk',
			   dateFormat: 'yy-mm-dd',														// 날짜형식(2012-03-03)
			   autoSize: false,																	//자동리사이즈(false 이면 상위 정의에 따름)
			   changeMonth: true,															// true이면 월변경, false이면 월변경못함
			   changeYear: true,																// true이면 년변경, false이면 년변경못함
			   showMonthAfterYear: true,													//년 뒤에 월 표시
			   buttonImageOnly: true,														//이미지표시
			   //buttonText: '달력선택',														//버튼 텍스트 표시
			   //buttonImage: '/calendar.gif',												//이미지주소
			   //showOn: "both",																//엘리먼트와 이미지 동시 사용(both,button)
			   yearRange: 'c-99:c+99',													//1990년부터 2020년까지
			   maxDate: '+2Y',																	// 오늘부터6년후날짜까지만, '+0d' 오늘 이전 날짜만 선택
			   minDate: '-5y'
			  };
			  $("#stDate").datepicker(clareCalendar);
			  $("#endDate").datepicker(clareCalendar);
			  $("#incomeDt").datepicker(clareCalendar);
			  $("#actionDt").datepicker(clareCalendar);
			  $("#bankDt").datepicker(clareCalendar);
			  $("img.ui-datepicker-trigger").attr("style","margin-left:5px; vertical-align:middle; cursor:pointer;"); //이미지버튼 style적용
			  $("#ui-datepicker-div").hide(); //자동으로 생성되는 div객체 숨김  
		});
		
	   $(window).load(function(){
	       grid01List(1);
	       fnCommonInit();
	    });     
</script>

<BODY topmargin="0" leftmargin="0">
<!-- #include virtual=/inc/menu.inc.asp -->  

<!-- 검색 영역 시작 -->
<div style="text-align:left;margin-top:10px;">
<!-- #include virtual=/inc/subMenu.inc.asp --> 
<table border="0" cellpadding="0" cellspacing="0" width="1385" style="margin-left:5px;">
	<form name="frmSearch"> 
	<tr height="40">
		<td style="padding: 0px 0 0px 10px;background-image:url(/inc/layout/panel-title-light-bg.gif);font-weight:bold;text-align:left" width="100%" class="lTD_trbl">		
			<select id="findInOut">
				<option value="IN">매출(입금)</option>
				<option value="OUT">매입(출금)</option>
			</select>	
			<select id="findYear">
				<%=yrOption%>
			</select> &nbsp;
			 <!--거래처 <input type="text" name="findComapny" id="findComapny" size="12" class="inputBox" onblur="fnFindCompany(this.value,'','findCompCd')"> <select name="findCompCd" id="findCompCd" style="width:150px"><option value="">--거래처--</option></select>-->
			<input type="button" onClick="grid01List()" value="검 색" class="inputBtn">&nbsp;
		</td>
	</tr>
	</form>
</table>
</div>
<!-- 검색 영역 끝 -->


<br>

<!-- 그리드 시작 -->
<div style="text-align:left">
<table border="0" cellpadding="0" cellspacing="0" width="1200" style="margin-left:5px;text-align:left">
	<tr>
		<td width="100%" class="lTD_trbl" valign="top" style="padding: 5px 5px 5px 5px;">
			<table border="0" cellpadding="0" cellspacing="0" width="1200">
				<tr height="24">
					<td style="padding: 0 0 0 0;text-align:left" width="400"><input type="button" class="subTitleBtn" style="width:80px;" value="통계" ReadOnly>&nbsp;<a href="javascript:grid01List()">[새로고침]</a> &nbsp; </td>
					<td style="padding: 0 20px 0 0;" align="right" width="800"><B>Total :</B> <span id="grid01Cnt" style="font-weight:bold">0</span></td>
				</tr>
			</table>
			<table border="0" cellpadding="0" cellspacing="0" width="1250"><tr><td style="background-color:#3366CC;height:2px"></td></tr></table>				
			<div id="grid1">
				<div id="gridHeader1">
					<div style="width:140px"><p>거래처</p></div>
					<div style="width:79px"><p>1월</p></div>
					<div style="width:79px"><p>2월</p></div>
					<div style="width:79px"><p>3월</p></div>
					<div style="width:79px"><p>4월</p></div>
					<div style="width:79px"><p>5월</p></div>
					<div style="width:79px"><p>6월</p></div>
					<div style="width:79px"><p>7월</p></div>
					<div style="width:79px"><p>8월</p></div>
					<div style="width:79px"><p>9월</p></div>
					<div style="width:79px"><p>10월</p></div>
					<div style="width:79px"><p>11월</p></div>
					<div style="width:79px"><p>12월</p></div>
					<div style="width:79px"><p>Total</p></div>
					<div style="width:49px"><p>%</p></div>
					<div style="width:18px">&nbsp;</div>
				</div>
				<div id="noResult1">
					<div><p>결과가 없습니다.</p></div>
				</div>
				<div id="gridBody1" style="display:none;">								
				</div>
				<div id="gridTail1" style="">
					<div class="term"></div>
					<div id="pager1"></div>
				</div>
			</div>		
		</td>
	</tr>
</table>
</div>
<!-- 그리그 끝 -->

<script language="javascript">
	setMainMenu();
//	//## 테스트를 위한 기본 값세팅	
//	$("#company").val("아이탱크");
//	$("#owner").val("James");
//	$("#phone").val("02-538-5966");
//	$("#fax").val("02-569-2365");
//	$("#major").val("Jade");
//	$("#cellPhone").val("020-5623-5656");
//	$("#compNo").val("02-232-223369");
//	$("#memo").val("연습입니다. ㅋ");
//	$("#flag").val("Y");
////	$("#compCd").val("4");
</script>
</BODY>
</HTML>